//auto gen by paipai.java.augogen ver 154
//author floatman
#ifndef _GISMAPGATEWAYAO_GIS_H_
#define _GISMAPGATEWAYAO_GIS_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_gismapgatewayao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <vector>
#include "erp/gis/po/coordinatesquerypo_gis.h"
#include "erp/gis/po/coordinatespo_gis.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
HEADER_SELF_DEFINE_END

namespace erp
{
namespace gis
{
namespace ao
{

#define GISMAPGATEWAYAO_SERVICE_VERSION "ERP_GIS_AO___GISMAPGATEWAYAO__SERVICE_VERSION__1.0 9d32cf642cc3fa637edcada56a92a83"
const std::string GISMAPGATEWAYAO_SERVICE_NOUSE = GISMAPGATEWAYAO_SERVICE_VERSION;

SERVICE class CGisMapGatewayAo : public IGisMapGatewayAo{
public:
		CGisMapGatewayAo(enum DeployMethod method = DEPLOY_STANDALONE);
		~CGisMapGatewayAo();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *   获取soso地图经纬度 
	 *
	 */
	EXPORT(0xc0251001) uint32_t GetSosoCoordinates(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
		 const std::string& strInReserve,
		 std::vector<erp::gis::po::CCoordinatesPo> & vecCoordinatesPo,
		 std::string& strErrMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *   获取soso2地图经纬度 
	 *
	 */
	EXPORT(0xc0511001) uint32_t GetSoso2Coordinates(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
		 const std::string& strInReserve,
		 std::vector<erp::gis::po::CCoordinatesPo> & vecCoordinatesPo,
		 std::string& strErrMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *   获取baidu地图经纬度 
	 *
	 */
	EXPORT(0xc0521001) uint32_t GetBaiduCoordinates(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
		 const std::string& strInReserve,
		 std::vector<erp::gis::po::CCoordinatesPo> & vecCoordinatesPo,
		 std::string& strErrMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *   获取google地图经纬度 
	 *
	 */
	EXPORT(0xc0531001) uint32_t GetGoogleCoordinates(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
		 const std::string& strInReserve,
		 std::vector<erp::gis::po::CCoordinatesPo> & vecCoordinatesPo,
		 std::string& strErrMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *   获取阿里云地图经纬度 
	 *
	 */
	EXPORT(0xc0541001) uint32_t GetAliyunCoordinates(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
		 const std::string& strInReserve,
		 std::vector<erp::gis::po::CCoordinatesPo> & vecCoordinatesPo,
		 std::string& strErrMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *   获取高德地图经纬度 
	 *
	 */
	EXPORT(0xc0551001) uint32_t GetGaodeCoordinates(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
		 const std::string& strInReserve,
		 std::vector<erp::gis::po::CCoordinatesPo> & vecCoordinatesPo,
		 std::string& strErrMsg,
		 std::string& strOutReserve
		);

SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/

private:
	uint32_t GetCoordinateFromGisMap(
				const CCntlInfo& rCntlInfo,
				const std::string& strMachineKey,
				const std::string& strSource,
				uint32_t dwSceneId,
				uint32_t dwApiType,
				const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
				const std::string& strInReserve,
				std::vector<erp::gis::po::CCoordinatesPo >& vecCoordinatesPo,
				std::string& strErrMsg,
				std::string& strOutReserve);
	
	uint32_t CheckCoordinateQueryPo(
				const erp::gis::po::CCoordinatesQueryPo& oCoordinatesQueryPo,
				std::string& strErrMsg);



private:
	static uint32_t           m_dwReqSlowValue;
	static std::string        m_strLogModule;

SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
};

}
}
}

#endif /* _GISMAPGATEWAYAO_GIS_H_ */